/**
 * @file 工单操作-开发票
 * @author yangjiangming <449654337@qq.com>
 * @date 2018-12-10 20:13:16
 */
layui.extend({
    oms_work_modify_route: 'work/modify/common/zmn.modify.route'
}).define(['oms_work_modify_route', 'list_modify_common'], function (exports) {
    const route = layui.oms_work_modify_route;
    let opCommonUtils = layui.list_modify_common;

    window.reloadDetail = function (workId, orderId) {
        window.location.href = route._calculateHostForOMS() + '/work/modify/detail.action?orderId='+ orderId +'&workId='+ workId +'&operateId=103&moduleId=510';
    };

    function initPage() {
        window.opCommonUtils = opCommonUtils;
        // 构建URL
        let url = route._calculateHostForERP() + '/invoice/omsuserinvoice/entry/' + orderId + '/' + workId;
        $("#account-iframe").attr('src', url);
    }

    // 程序入口
    function init() {
        initPage();
    }

    // 初始化
    init();

    exports('oms_work_modify_invoice');
});
